package team.seekers.hula.course.courseUser.entity.dao;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import team.seekers.hula.common.entity.BaseDO;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(CourseUserDOField.TABLE_NAME)
public class CourseUserDO extends BaseDO {

    private static final long serialVersionUID = 1L;

    @TableId(value = CourseUserDOField.ID, type = IdType.ASSIGN_ID)
    private String id;

    @TableField(CourseUserDOField.USER_ID)
    private String userId;

    @TableField(CourseUserDOField.COURSE_ID)
    private String courseId;

    /**
     * 学习评价
     */
    @TableField(CourseUserDOField.COMMENT)
    private String comment;

    /**
     * 角色
     */
    @TableField(CourseUserDOField.ROLE)
    private Integer role;

    /**
     * 学习进度
     */
    @TableField(CourseUserDOField.PROGRESS)
    private Integer progress;

    /**
     * 在这个浪屿获得的hula币
     */
    @TableField(CourseUserDOField.HULA_COIN)
    private Double hulaCoin;


    @TableField(CourseUserDOField.LAST_SECTION_ID)
    private String lastSectionId;


    @TableField(CourseUserDOField.LAST_PROGRESS)
    private Integer lastProgress;

    @TableField(CourseUserDOField.FIXED)
    private Integer isFixed;

    @TableField(CourseUserDOField.DELETED)
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    @TableField(value = CourseUserDOField.GMT_CREATE, fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(value = CourseUserDOField.GMT_MODIFIED, fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
